const Router = require("koa-router")

/**
 * 路由对象
 * @type {Router}
 */
const router = new Router()

/**
 * 授权鉴定及授权过滤
 */
const auth_router = require('./auth/index')
const aishouru_router = require('./aishouru/index')
const views_router = require('./views/index')
const logs_router = require('./logs/index')
router
	.use(views_router.routes(), views_router.allowedMethods())
	.use(aishouru_router.routes(), aishouru_router.allowedMethods())
	.use(auth_router.routes(), auth_router.allowedMethods())
	.use(logs_router.routes(), logs_router.allowedMethods())


// router.all('*', async function (ctx, next) {
//   ctx.redirect('/404.html')
// })

module.exports = router
